<!DOCTYPE html>
<html>
    <head>
        <title>目录展示</title>
        <meta name="viewport" content="width=device-width, initial-scale=1" />
    </head>
    <style>
        a {
            color: #fff;
            text-decoration: none;
        }
        a:visited {
            color: #fff;
        }
        a:hover {
            color: #fff;
        }
        a:link {
            color: #fff;
        }
        .dir-item {
            float: left;
            margin: 10px;
            background: rgb(21, 132, 236);
            padding: 0 20px;
            border-radius: 10px;
            line-height: 30px;
            text-align: center;
        }
        .last-page {
            float: none;
        }
    </style>
    <body>
        <p>
            <a href="../" class="dir-item last-page">上一层</a>
        </p>
        <% for(let i=0;i<dirs.length;i++) { %>
            <div class="dir-item">
                <a href="<%= root + '/' + dirs[i] %>"><%= dirs[i] %></a>
            </div>
        <% } %>
    </body>
</html>